<template>
  <div class="swiper-container mySwiper">
    <div class="swiper-wrapper">
      <div class="swiper-slide">
        <img src="./images/banner1.jpg" alt="" />
      </div>
      <div class="swiper-slide">
        <img src="./images/banner2.jpg" alt="" />
      </div>
      <div class="swiper-slide">
        <img src="./images/banner3.jpg" alt="" />
      </div>
      <div class="swiper-slide">
        <img src="./images/banner4.jpg" alt="" />
      </div>
    </div>
    <div class="swiper-button-next"></div>
    <div class="swiper-button-prev"></div>
    <div class="swiper-pagination"></div>
  </div>
</template>

<script>
import Swiper from "swiper"
import "swiper/css/swiper.min.css"
export default {
  mounted() {
    new Swiper(".mySwiper", {
      //无缝轮播播放
      loop: true,
      //自动轮播
      autoplay: true,
      // 分页器 小圆点
      pagination: {
        el: ".swiper-pagination",
        clickable: true,
      },
      // 左右箭头
      navigation: {
        nextEl: ".swiper-button-next",
        prevEl: ".swiper-button-prev",
      },
    })
  },
}
</script>

<style lang="less" scoped>
.swiper-box {
  width: 740px !important;
  height: 400px;
}
.swiper-slide {
  img {
    width: 1226px;
    height: 460px;
  }
}
.swiper-container {
  position: relative;
}
.swiper-button-prev {
  position: absolute;
  left: 234px;
}
.swiper-pagination {
  width: 400 px;
  left: auto;
  right: 60 px !important;
  bottom: 20 px;
  text-align: right;
}
</style>